package net.qhzw.vip.qiyu.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import net.qhzw.vip.qiyu.entity.*;
import net.qhzw.vip.qiyu.model.ContractFom;
import net.qhzw.vip.qiyu.model.ContractVo;

import javax.servlet.http.HttpServletRequest;

public interface ContractService extends IService<Contract> {


    /***
     * 查看合同
     * @param userId
     * @return
     */
    ContractVo find(Long userId);


    /***
     * 根据站点id查询站点地址
     * @param communityId
     * @return
     */
    String findAddressById(String communityId);

    Long addContract(ContractFom contractFom, HttpServletRequest request);


    /***
     * 分页查询提交的合同
     * @param page
     * @param keywords
     * @return
     */
    Page<Contract> findBYPage(Page<Contract> page, String keywords, Byte status);

    boolean addOrderId(long orderId, Long contractItemId);


    /***
     * 根据UserId查询
     * @param userId
     * @return
     */
    DtsUser findUserById(Long userId);


    /***
     * 根据用户换电ID
     * @param batterySwapId
     * @return
     */
    SysContract getSysContractByBatterySwapId(String batterySwapId);


    /***
     * 查询租车申请
     * @param dtsCarRentalId
     * @return
     */
    DtsCarRental findDtsCarRentalById(Long dtsCarRentalId);


    /***
     * 根据id获取站点信息
     * @param communityId
     * @return
     */
    SysCommunity getCommunityById(Long communityId);


    /***
     * 根据id获取车辆信息
     * @param repairCodeId
     * @return
     */
    RepairCode getRepairCodeById(Long repairCodeId);


    /***
     * 根据ID获取担保公司
     * @param guaranteeCompanyId
     * @return
     */
    GuaranteeCompany getGuaranteeCompanyById(Long guaranteeCompanyId);


    /***
     * 获取担保站点
     * @param idCard
     * @return
     */
    GuaranteeSite getGuaranteeSiteByUserId(String idCard);
}
